package com.yxy.service;

import com.yxy.common.ServerResponse;
import com.yxy.entity.User;

import java.util.List;

/**
 * Created by 小俊 on 2017/8/1.
 */
public interface IUserService {

    User login(String phone, String password);//手机号和密码

    int register(User user);

    boolean checkValid(String str, String type);
    boolean updateByPrimaryKey(User record);


    ServerResponse<String> forgetRestPassWord(String username, String passwordNew, String forgetToken);

    int checkPhone(String phone);

    User getUserInfo(Integer id);

    /**
     * 查询参与运动的所用用户
     * @param sportId
     * @return
     */

    List<User> selectJoinSportPerson(Integer sportId);

    boolean insertContactPerson(Integer userId,Integer toUserId);

    boolean deleteContactPerson(Integer userId,Integer toUserId);

    List<User> selectContactPersonList(Integer userId);

    boolean selectContactPerson(Integer userId,Integer toUserId);

    User selectUserByPhone(String phone);

    /**
     * 后台管理
     */
    User AdminLogin(User user);

    List<User> selectAll();

    boolean deleteUserById(Integer id);

    User selectUserById(Integer id);

    List<User> findLikeList(User user);

    ServerResponse<String> resetPassword(String passwordOld,String passwordNew,User user);

}
